.TH fullock "3" "May 2015" "fullock" "FULLOCK"
.SH NAME
fullock \- Fast User Level LOCK (FULLOCK) library for C/C++
.SH SYNOPSIS
Please see
.B fullock.h
for full description.
.SH DESCRIPTION
.I
fullock
is an open-source software for user level lock library supported by Yahoo! JAPAN.
It runs on user level and provides two types lock.
One is a shared reader/writer lock which has the same functionality with
pthread_rwlock.
Another is a shared mutex lock which also has the same functionality with pthread_mutex.
.LP
Here is primary fullock features:
.IP 1.
.I fullock
is a thread safety library which can be used for multi-processing as well as for multi-threading.
.IP 2.
.I fullock
releases a mutex lock safely even if a lock owner process exit with 0 in which case OS doesn't release the lock.
.IP 3.
.I fullock
provides a shared reader/writer lock. A lock owner thread can get another lock again without deadlock.
.LP
Please visit our website and get more details at:
.IP
.I https://github.com/yahoojapan/fullock
.SH FUNCTIONS
.TP 2
FULLOCK provides following programming interface:
.IP
.in +4n
.nf
void fullock_print_version(...)
bool fullock_set_no_robust(...)
bool fullock_set_low_robust(...)
bool fullock_set_high_robust(...)
bool fullock_set_noretry_allow_nomap(...)
bool fullock_set_noretry_deny_nomap(...)
bool fullock_set_retry_allow_nomap(...)
bool fullock_set_retry_deny_nomap(...)
bool fullock_set_no_freeunit(...)
bool fullock_set_fd_freeunit(...)
bool fullock_set_offset_freeunit(...)
bool fullock_set_robust_check_count(...)
bool fullock_reinitialize(...)
bool fullock_reinitialize_ex(...)
int fullock_mutex_lock(...)
int fullock_mutex_trylock(...)
int fullock_mutex_timedlock(...)
int fullock_mutex_unlock(...)
int fullock_rwlock_rdlock(...)
int fullock_rwlock_tryrdlock(...)
int fullock_rwlock_timedrdlock(...)
int fullock_rwlock_wrlock(...)
int fullock_rwlock_trywrlock(...)
int fullock_rwlock_timedwrlock(...)
int fullock_rwlock_unrwlock(...)
bool fullock_rwlock_islocked(...)
int fullock_cond_timedwait(...)
int fullock_cond_wait(...)
int fullock_cond_signal(...)
int fullock_cond_broadcast(...)
.fi
.in

.SH ENVIRONMENT
.I
fullock
uses useful environments for debug that change its behaviour.
.IP FLCKDBGMODE 20
specifies debugging level: INFO/WAN/ERR/SILENT
.IP FLCKDBGFILE 20
output file path for message(default: stderr)
.IP FLCKAUTOINIT 20
specify YES/NO, if this environment has YES, fullock does not initialize shared memory file. This environment is for debugging.
.IP FLCKROBUSTMODE 20
specify NO/LOW/HIGH for robust mode.
.IP FLCKNOMAPMODE 20
specify ALLOW(ALLOW_NORETRY) / DENY(DENY_NORETRY) / ALLOW_RETRY / DENY_RETRY for fault tolerant.
This value determines the behavior of the case can not be mapped.
.IP FLCKFREEUNITMODE 20
specify NO/FD/OFFSET/ALWAYS, it specifies the open method of unit management area to be used in the reader/writer lock.
.IP FLCKROBUSTCHKCNT 20
If fullock is operating in a high robust mode, this value sets the processing frequency for the deadlock detection.
.IP FLCKUMASK 20
specify umask for the shared memory file which is made by fullock.
.IP FLCKDIRPATH 20
specify directory path for the shared memory file which is made by fullock.
.IP FLCKFILENAME 20
specify the shared memory file name which is made by fullock.
.IP FLCKFILECNT 20
specify file count for the reader/writer lock.
.IP FLCKOFFETCNT 20
specify offset count for the reader/writer lock.
.IP FLCKLOCKERCNT 20
specify the process(thread) count for the reader/writer lock and mutex at same time.
.IP FLCKNMTXCNT 20
specify count for named mutex.
.IP FLCKNCONDCNT 20
specify count for named condition variable.
.IP FLCKWAITERCNT 20
specify named condition waiter count for named condition variable.
.SH SEE ALSO
The web site can be found at:
.IP
.I https://github.com/yahoojapan/fullock
.SH REPORTING BUGS
Please make sure you use the latest version in the web site:
.IP
https://github.com/yahoojapan/fullock
.LP
Then, please submit your questions or comments here:
.IP
.I https://github.com/yahoojapan/fullock/issues
.SH "AUTHORS"
Takeshi Nakatani <ggtakec@gmail.com>
.SH "COPYRIGHT"
MIT License
.PP
Copyright (C) 2015 Yahoo Japan Corporation
.PP
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.PP
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.PP
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
